package com.fs.groupSeven.service;

import com.fs.groupSeven.pojo.*;
import com.fs.groupSeven.pojo.Class;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface StudentService {

    //根据学院id查询班级名称
    List<Class> queryClassList(Integer collegeId);

    //分页查询学生信息
    PageInfo<Student> getStudentsByPage(Integer currentPage, Integer pageSize);

    //添加学生信息
    boolean addOne(Student student);

    //编辑学生信息
    boolean modifyOne(Student student);

    //通过学生id得到这个学生的详细信息
    Student getOneByStudentId(Integer studentId);

    //通过学生id逻辑删除
    int delStudentByStudentId(Integer studentId);

    //模糊查询当前页的学生信息
    List<Student> searchStudentsByPage(Integer currentPage, Integer pageSize, String searchValue);

    //模糊查询数据库的所有学生信息
    List<Student> searchStudentsByAll(String searchValue);

    //根据班级id查询学生信息
    PageInfo<Student> selStudentsByClassId(Integer currentPage, Integer pageSize, Integer classId);

    //根据学号查询学生id，姓名
    List<Student> queryStudentSomeInformationByStuNum(Integer stuNum);

    //根据学生id和科目名称判断成绩是否已经存在
    boolean queryScoreIsExistByStudentIdAndSubjectName(String subjectName, Integer studentId);

    //添加成绩
    int addGrade(Integer studentId, String subjectName, Integer usualscore, Integer examscore, Integer finalscore);

    PageInfo<Grade> getGradeTable(Integer currentPage, Integer pageSize,Integer classId, String subjectName);

    Student getOneGradeByGradeId(Integer gradeId);

    //修改成绩
    int editGradeByGradeId(Integer gradeId, Integer usualscore, Integer examscore, Integer finalscore);

    List<Student> searchStudentGrade(String searchValue);

    List<Class> showClassesByIndex();

    List<Subject> querySubjectList(Integer collegeId);

    List<College> selCollegeNameList();
}
